#pragma once

#include "NodeType.h"

namespace Huffman {

	class Node
	{
	public:
		Node(void);
		Node(int sybmol, unsigned long weight, int order, NodeType nodeType);
		~Node(void);

		Node* getLeft() const;
		void setLeft(Node* n);

		Node* getRight() const;
		void setRight(Node* n);

		Node* getParent() const;
		void setParent(Node* n);

		unsigned long getWeight() const;
		void setWeight(unsigned long weight);

		int getSymbol() const;
		void setSymbol(int symbol);

		int getOrder() const;
		void setOrder(int order);

		int getId() const;
		void setId(int id);

		int getParity() const;
		void setParity(int parity);

		Node* getNext() const;
		void setNext(Node* n);

		Node* getPrev() const;
		void setPrev(Node* n);

		NodeType getNodeType() const;
		void setNodeType(NodeType nodeType);

	private:
		Node* left;
		Node* right;
		Node* parent;

		Node* prev;
		Node* next;
		
		int order;
		unsigned long weight;
		int symbol;
		int parity;
		int id;

		NodeType nodeType;

		static int nextId;
	};
}
